package com.ruoyi.web.controller.api;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.platform.domain.MStore;
import com.ruoyi.platform.service.IMWarningService;
import com.ruoyi.platform.vo.hik.HkAlarmData;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @description 接收超脑数据,以rest风格接收
 * @author:Figo2020
 * @date: 2025/10/26 10:40
 */
@RestController
@RequestMapping("/api")
public class OpenApiController {
    
    @Resource
    private IMWarningService warningService;
    
    @Log(title = "接收到来自超脑数据", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult receiveHkAlarmData(@RequestBody HkAlarmData alarmData)
    {
        return AjaxResult.success(warningService.saveAlarmWarningInfo(alarmData));
    }
    
}
